package com.core.dao;

import org.hibernate.Session;

import com.core.utility.HibernateUtils;
import com.core.web.actions.UserForm;

public class UserDetails {
	
	public static int addUser(UserForm userBean)
	{
		Session session = HibernateUtils.getSessionFactory().getCurrentSession();
		session.beginTransaction();
		User user=new User();
		user.setEmailId(userBean.getEmailId());
		user.setFname(userBean.getFirstName());
		user.setName(userBean.getName());
		session.saveOrUpdate(user);
		session.getTransaction().commit();
		
		
		return 0;
	}
    
   
    
    

}
